<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 1. 定义模板 -->
    <div id="app">
      <ul>
        <li v-for="(value,key) in arr" :key="key">{{value}},{{key}}</li>
      </ul>
      <ul>
        <li v-for="(value,key) in obj" :key="key">{{value}},{{key}}</li>
      </ul>
      <ul>
        <li v-for="(value,key) in str" :key="key">{{value}},{{key}}</li>
      </ul>
      <ul>
        <li v-for="(value,key) in num" :key="key">{{value}},{{key}}</li>
      </ul>
    </div>
    <!-- 2. 引入vue.js -->
    <script src="./vue.js"></script>

    <!-- 3. 创建vue实例 -->
    <script>
      var vm = new Vue({
        el: '#app',
        data: {
          arr: ['a', 'b', 'c'],
          obj: {
            name: 'zs',
            age: 18,
            info: '法外狂徒',
          },
          str: 'xyz',
          num: 3,
        },
      })
    </script>
  </body>
</html>
